PackageDescription: Reducers Classic API
Reducers Classic APILast published: May 31, 2017 by 'stm'
Defines 1 Classes
Extends 6 Classes
Reducers Classic API provides two alternative methods to create and combine Reducers and Transducers that reflect a more classic ST API style.
Usage
## Flow Style (Default)
| pipe |
Set <~ #negated mapping <~ #odd filtering <~ (1 to: 10).
pipe := #negated mapping <~ #odd filtering.
Set <~ pipe <~ (1 to: 10).
## Classic Collection Style using #reducing or Reducer directly
| pipe |
(((1 to: 10) reducing filter: #odd) map: #negated) into: Set.
pipe := (Reducer new filter: #odd) map: #negated.
pipe
reducible: (1 to: 10);
into: Set.
## Factory Style using #pipe or ReducerBuilder directly
| pipe |
(1 to: 10) pipe
filter: #odd;
map: #negated;
into: Set.
pipe := ReducerBuilder pipe
filter: #odd;
map: #negated.
pipe
reducible: (1 to: 10);
into: Set.